home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update15.zoo / include / ostruct.h < prev   
Encoding:
C/C++ Source or Header  |  1992-01-29  |  4.2 KB  |  160 lines

  1. #ifndef _OSTRUCT_H
  2. #define _OSTRUCT_H
  3.  
  4. #if defined(__cplusplus)
  5. extern "C" {
  6. #endif
  7.  
  8. /*
  9.  * General OS specific codes here
  10.  *
  11.  */
  12.  
  13. /*
  14.  * GEMDOS defines and structures
  15.  */
  16.  
  17. /* Structure used by Dfree() */
  18. typedef struct {
  19.     long b_free;    /* number of free clusters */
  20.     long b_total;    /* total number of clusters */
  21.     long b_secsiz;    /* number of bytes per sector */
  22.     long b_clsiz;    /* number of sectors per cluster */
  23. } _DISKINFO;
  24.  
  25. /* Structure returned by Fdatime() */
  26. typedef struct {
  27.   short time;
  28.   short date;
  29. } _DOSTIME;
  30.  
  31. /* Structure used by Fgetdta(), Fsetdta(), Fsfirst(), Fsnext() */
  32. struct _dta {
  33.     char         dta_buf[21];    /* reserved */
  34.     char            dta_attribute;    /* file attribute */
  35.     unsigned short  dta_time;        /* file time stamp */
  36.     unsigned short  dta_date;        /* file date stamp */
  37.     long            dta_size;        /* file size */
  38.     char            dta_name[14];    /* file name */
  39. };
  40.  
  41. /* Codes used with Fsfirst() */
  42.  
  43. #define        FA_RDONLY           0x01
  44. #define        FA_HIDDEN           0x02
  45. #define        FA_SYSTEM           0x04
  46. #define        FA_LABEL            0x08
  47. #define        FA_DIR              0x10
  48. #define        FA_CHANGED          0x20
  49.  
  50. /* Codes used with Pexec */
  51.  
  52. #define        PE_LOADGO           0           /* load & go */
  53. #define        PE_LOAD             3           /* just load */
  54. #define        PE_GO               4           /* just go */
  55. #define        PE_CBASEPAGE        5           /* just create basepage */
  56. /* Tos 1.4: like 4, but memory ownership changed to child, and freed
  57.    on exit
  58.  */
  59. #define        PE_GO_FREE          6           /* just go, then free */
  60.  
  61. #ifdef __MINT__
  62. /* ers: what exactly does mode 7 do ??? */
  63. #  define    PE_ASYNC_LOADGO       100           /* load and asynchronously go */
  64. #  define       PE_ASYNC_GO       104           /* asynchronously go         */
  65. #  define       PE_ASYNC_GO_FREE   106           /* asynchronously go and free */
  66. #  define       PE_OVERLAY       200           /* load and overlay         */
  67. #endif
  68.  
  69. /*
  70.  * BIOS defines and structures
  71.  */
  72.  
  73. /* Device codes for Bconin(), Bconout(), Bcostat(), Bconstat() */
  74. #define _PRT    0
  75. #define _AUX    1
  76. #define _CON    2
  77. #define _MIDI   3
  78. #define _IKBD   4
  79. #define _RAWCON 5
  80.  
  81. /* Structure returned by Getbpb() */
  82. typedef struct {
  83.   short recsiz;         /* bytes per sector */
  84.   short clsiz;          /* sectors per cluster */
  85.   short clsizb;         /* bytes per cluster */
  86.   short rdlen;          /* root directory size */
  87.   short fsiz;           /* size of file allocation table */
  88.   short fatrec;         /* startsector of second FAT */
  89.   short datrec;         /* first data sector */
  90.   short numcl;          /* total number of clusters */
  91.   short bflags;         /* some flags */
  92. } _BPB;
  93.  
  94. /* Structures used by Getmpb() */
  95.  
  96. /* Memory descriptor */
  97. typedef struct _md {
  98.     struct _md    *md_next;    /* next descriptor in the chain */
  99.     long     md_start;    /* starting address of block */
  100.     long     md_length;    /* length of the block */
  101.     long     md_owner;    /* owner's process descriptor */
  102. } _MD;
  103.  
  104. /* Memory parameter block */
  105. typedef struct {
  106.     _MD *mp_free;        /* free memory chunks */
  107.     _MD *mp_used;        /* used memory descriptors */
  108.     _MD *mp_rover;        /* rover memory descriptor */
  109. } _MPB;
  110.  
  111.  
  112. /*
  113.  * XBIOS defines and structures
  114.  */
  115.  
  116. /* Codes used with Cursconf() */
  117. #define CURS_HIDE       0
  118. #define CURS_SHOW       1
  119. #define CURS_BLINK      2
  120. #define CURS_NOBLINK    3
  121. #define CURS_SETRATE    4
  122. #define CURS_GETRATE    5
  123.  
  124. /* Structure returned by Iorec() */
  125. typedef struct {
  126.     char    *ibuf;
  127.     short   ibufsiz;
  128.     short   ibufhd;
  129.     short   ibuftl;
  130.     short   ibuflow;
  131.     short   ibufhi;
  132. } _IOREC;
  133.  
  134. /* Structure returned by Kbdvbase() */
  135. typedef struct {
  136.     void    (*midivec)(void);
  137.     void    (*vkbderr)(void);
  138.     void    (*vmiderr)(void);
  139.     void    (*statvec)(void *);
  140.     void    (*mousevec)(void *);
  141.     void    (*clockvec)(void *);
  142.     void    (*joyvec)(void *);
  143.     long    (*midisys)(void);
  144.     long    (*ikbdsys)(void);
  145.     char    kbstate;
  146. } _KBDVECS;
  147.  
  148. /* Structure returned by Keytbl() */
  149. typedef struct {
  150.     void *unshift;    /* pointer to unshifted keys */
  151.     void *shift;    /* pointer to shifted keys */
  152.     void *caps;        /* pointer to capslock keys */
  153. } _KEYTAB;
  154.  
  155. #if defined(__cplusplus)
  156. }
  157. #endif
  158.  
  159. #endif /* _OSTRUCT_H */
  160.